import pytest

# # 案例1：单个数据
# str = ['hello']
#
#
# @pytest.mark.parametrize('p1', str)
# def test1(p1):
#     print(p1)
#     assert 'h' in p1


# # 案例2：组合数据
# str = ['hello', 'world', 'aaa']
#
#
# @pytest.mark.parametrize('p1', str)
# def test2(p1):
#     print(p1)
#     assert 'h' in p1


# 案例3：组合数据 - 拆分
str = [['java', 'java_百度搜索'], ['python', 'python_百度搜索']]


@pytest.mark.parametrize('p1,p2', str)
def test3(p1, p2):
    print(p1, p2)
